﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using mal.balades.Business.Web;
using mal.balades.Business.DataModel;

namespace mal.balades.Web.Administration
{
    [ServiceContract(Namespace = "mal.balades.Web.Administration")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class FeedService
    {        
        [OperationContract]
        public List<Feed> GetAllFeeds()
        {
            return BaladesManagerProxy.Instance.FeedDataAccess.GetAllFeeds().ToList();
        }

        [OperationContract]
        public List<Feed> SaveFeeds(List<Feed> feeds)
        {
            BaladesManagerProxy.Instance.FeedDataAccess.UpdateFeeds(feeds);

            return GetAllFeeds();
        }
    }
}
